package com.ruoyi.permission.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.permission.mapper.PeopleUserMapper;
import com.ruoyi.permission.domain.PeopleUser;
import com.ruoyi.permission.service.IPeopleUserService;

/**
 * 人员管理Service业务层处理
 * 
 * @author tzh
 * @date 2025-09-12
 */
@Service
public class PeopleUserServiceImpl implements IPeopleUserService 
{
    @Autowired
    private PeopleUserMapper peopleUserMapper;

    /**
     * 查询人员管理
     * 
     * @param id 人员管理主键
     * @return 人员管理
     */
    @Override
    public PeopleUser selectPeopleUserById(Long id)
    {
        return peopleUserMapper.selectPeopleUserById(id);
    }

    /**
     * 查询人员管理列表
     * 
     * @param peopleUser 人员管理
     * @return 人员管理
     */
    @Override
    public List<PeopleUser> selectPeopleUserList(PeopleUser peopleUser)
    {
        return peopleUserMapper.selectPeopleUserList(peopleUser);
    }

    /**
     * 新增人员管理
     * 
     * @param peopleUser 人员管理
     * @return 结果
     */
    @Override
    public int insertPeopleUser(PeopleUser peopleUser)
    {
        peopleUser.setCreateTime(DateUtils.getNowDate());
        return peopleUserMapper.insertPeopleUser(peopleUser);
    }

    /**
     * 修改人员管理
     * 
     * @param peopleUser 人员管理
     * @return 结果
     */
    @Override
    public int updatePeopleUser(PeopleUser peopleUser)
    {
        peopleUser.setUpdateTime(DateUtils.getNowDate());
        return peopleUserMapper.updatePeopleUser(peopleUser);
    }

    /**
     * 批量删除人员管理
     * 
     * @param ids 需要删除的人员管理主键
     * @return 结果
     */
    @Override
    public int deletePeopleUserByIds(Long[] ids)
    {
        return peopleUserMapper.deletePeopleUserByIds(ids);
    }

    /**
     * 删除人员管理信息
     * 
     * @param id 人员管理主键
     * @return 结果
     */
    @Override
    public int deletePeopleUserById(Long id)
    {
        return peopleUserMapper.deletePeopleUserById(id);
    }
}
